#include <functional>
#include <iostream>
int main() {
  std::function<int(int, int)> fn1 = std::plus<int>();
  std::function<int(int, int)> fn2;
  try {
    std::cout << fn1(2, 4) << "\n";
    std::cout << fn2(3, 4) << "\n";
  } catch (std::bad_function_call &e) {
    std::cout << "bad function call\n";
  }
}
